# vim:ts=4:sw=4:noet:
""" Base Frame class """

import wx
from c.base.platform import Platform
from c.ui.wxw.common import getProperPath

class BaseFrame(wx.Frame):
	def __init__(self, parent, name, **kwargs):
		wx.Frame.__init__(self, parent, -1, name, **kwargs)
		icon = wx.Icon(getProperPath(Platform.getDataFilePath("fox.ico")), wx.BITMAP_TYPE_ICO)
		self.SetIcon(icon)
		self.firstShow = True

	def Show(self, s):
		if s and wx.Platform=="__WXMAC__" and self.firstShow:
			self.Centre()
			self.firstShow = False
		wx.Frame.Show(self,s)
